Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

172
Views
ReactJs in static production: White page "Typeerror: Object(...) is not a function"

I have a ReactJs project that has been testet and works perfectly in development.

I am now trying to host it on an Apache Server on my Ubuntu based VPS. Routing works fine apparently, one simple "about page" is loading fine. But all other routes result in a blank white page, and the following console errors: enter image description here

I suspect something might be wrong with dependencies: An example depency list for a non-working component looks like this:

import { Row, Col } from 'antd';
import { useNavigate } from "react-router-dom";
import BouncingBox from '../../components/bouncing-box/bouncing-box.jsx';
import RoundedBtn from '../../components/rounded-btn/rounded-btn.jsx';
import { Input } from 'antd';
import { useState, useRef } from 'react';
import FirebaseService from '../../services/FirebaseService.js';
import SessionStorageService from '../../services/SessionStorageService.js'
import { useParams } from 'react-router';
import { useEffect } from 'react/cjs/react.development';

Does anyone know what could be causing the issue? It is a project based on create-react-app, so we are using webpack along with some custom libraries. Should be noted that I have tried hosting it on Netlify with the EXACT same result, so probably not a server configuration issue.

EDIT:

join-game.jsx line 27 refers to this code...

 useEffect(() => {
        if (inputstate == 1) isHosting.current = true
    }, [])
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

So the issue for me was the import:

import { useEffect } from 'react/cjs/react.development';

Was auto generated. So I removed the line and I switched:

import { useState, useRef } from 'react';

To:

import { useState, useRef, UseEffect } from 'react';

Moral of the story: You can click the causing issue in dev tools and pretty print it, this will hint the file in which you should likely check your imports.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!